package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.TopicUser;
import com.zhijian.medical.entity.vo.request.TopicUserSearchVo;
import com.zhijian.medical.entity.vo.response.TopicUserVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TopicUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TopicUser record);

    int insertSelective(TopicUser record);

    TopicUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TopicUser record);

    int updateByPrimaryKey(TopicUser record);

    /**
     * 查询总数
     *
     * @param topicUserSearchVo
     * @return
     */
    int count(TopicUserSearchVo topicUserSearchVo);

    /**
     * 查询列表
     *
     * @param topicUserSearchVo
     * @return
     */
    List<TopicUserVo> selectList(TopicUserSearchVo topicUserSearchVo);

    /**
     * 查询单个
     *
     * @param topicUserSearchVo
     * @return
     */
    TopicUserVo selectOne(TopicUserSearchVo topicUserSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    TopicUserVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param topicUserSearchVo
     * @return
     */
    void deleteByCondition(TopicUserSearchVo topicUserSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<TopicUser> entities);

    /**
     * 根据UserId查询列表
     *
     * @param userId
     * @return
     */
    List<TopicUserVo> selectListByUserId(Long userId);
}